package com.yan.demo;

import com.yan.domain.Student;

import java.util.Scanner;

public class OOPDemo3 {
    public static void main(String[] args) {
        Student stu1 = new Student("张三", 20);
        Student stu2 = new Student("张三" , 20);

        System.out.println("stu1 = " + stu1);

        System.out.println("stu2 = " + stu2);

        boolean b = stu1.equals(stu2);
        System.out.println(b);
        int i = stu1.hashCode();
        System.out.println("i = " + i);
        int j = stu2.hashCode();
        System.out.println("j = " + j);
    }
}
